function Lnko(A: in out Positive; B: in out Positive) return Positive is
begin
   while A/=B loop
      if A<B then
         B:=B-A;
      else
         A:=A-B;
      end if;
   end loop;
   return A;
end Lnko;

